<template>
  <div class="message_cover_container"
  v-show="show">
    <div class="message_container">
      <div class="message_wrapper">
        <div>我是一条弹出的消息内容</div>
        <button @click="onClose">关闭</button>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props:{
    isShow:{
      type:Boolean,
      default:false
    }
  },
  data(){
    return{
      show:false
    }
  },
  methods:{
    onClose(){
      this.show = false;
    }
  }
}
</script>

<style scoped>
.message_cover_container
{
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.4);
  position: fixed;
  left: 0px;
  top: 0px;
  z-index: 9999;
}

.message_container
{
  width: 100%;
  height: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.message_wrapper
{
  width: 300px;
  height: 150px;
  background-color: white;
}
</style>